Optimal. Leaf size=113 \[ -\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {2 b^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a \left (a^2+b^2\right )^{3/2} d}+\frac {\text {sech}(c+d x)}{a d}-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 9, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2977, 2702,
327, 213, 2775, 12, 2739, 632, 210} \begin {gather*} -\frac {b \text {sech}(c+d x) (a \sinh (c+d x)+b)}{a d \left (a^2+b^2\right )}+\frac {2 b^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a d \left (a^2+b^2\right )^{3/2}}+\frac {\text {sech}(c+d x)}{a d}-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 210
Rule 213
Rule 327
Rule 632
Rule 2702
Rule 2739
Rule 2775
Rule 2977
Rubi steps
\begin {align*} \int \frac {\text {csch}(c+d x) \text {sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx &=i \int \left (-\frac {i \text {csch}(c+d x) \text {sech}^2(c+d x)}{a}+\frac {i b \text {sech}^2(c+d x)}{a (a+b \sinh (c+d x))}\right ) \, dx\\ &=\frac {\int \text {csch}(c+d x) \text {sech}^2(c+d x) \, dx}{a}-\frac {b \int \frac {\text {sech}^2(c+d x)}{a+b \sinh (c+d x)} \, dx}{a}\\ &=-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac {b \int \frac {b^2}{a+b \sinh (c+d x)} \, dx}{a \left (a^2+b^2\right )}+\frac {\text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{a d}\\ &=\frac {\text {sech}(c+d x)}{a d}-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac {b^3 \int \frac {1}{a+b \sinh (c+d x)} \, dx}{a \left (a^2+b^2\right )}+\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\text {sech}(c+d x)\right )}{a d}\\ &=-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {\text {sech}(c+d x)}{a d}-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}+\frac {\left (2 i b^3\right ) \text {Subst}\left (\int \frac {1}{a-2 i b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{a \left (a^2+b^2\right ) d}\\ &=-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {\text {sech}(c+d x)}{a d}-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}-\frac {\left (4 i b^3\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2+b^2\right )-x^2} \, dx,x,-2 i b+2 a \tan \left (\frac {1}{2} (i c+i d x)\right )\right )}{a \left (a^2+b^2\right ) d}\\ &=-\frac {\tanh ^{-1}(\cosh (c+d x))}{a d}+\frac {2 b^3 \tanh ^{-1}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )}{a \left (a^2+b^2\right )^{3/2} d}+\frac {\text {sech}(c+d x)}{a d}-\frac {b \text {sech}(c+d x) (b+a \sinh (c+d x))}{a \left (a^2+b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 171, normalized size = 1.51 \begin {gather*} -\frac {-2 b^3 \text {ArcTan}\left (\frac {b-a \tanh \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2-b^2}}\right )+a^2 \sqrt {-a^2-b^2} \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )+b^2 \sqrt {-a^2-b^2} \log \left (\tanh \left (\frac {1}{2} (c+d x)\right )\right )+a^2 \sqrt {-a^2-b^2} \text {sech}(c+d x)-a b \sqrt {-a^2-b^2} \tanh (c+d x)}{a \left (-a^2-b^2\right )^{3/2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.64, size = 106, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{\left (a^{2}+b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 b^{3} \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}}{d}\) | \(106\) |
default | \(\frac {-\frac {2 \left (b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{\left (a^{2}+b^{2}\right ) \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 b^{3} \arctanh \left (\frac {2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}}{d}\) | \(106\) |
risch | \(\frac {2 a \,{\mathrm e}^{d x +c}+2 b}{d \left (a^{2}+b^{2}\right ) \left (1+{\mathrm e}^{2 d x +2 c}\right )}-\frac {\ln \left ({\mathrm e}^{d x +c}+1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{d x +c}-1\right )}{d a}+\frac {b^{3} \ln \left ({\mathrm e}^{d x +c}+\frac {a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}+a^{4}+2 a^{2} b^{2}+b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}} d a}-\frac {b^{3} \ln \left ({\mathrm e}^{d x +c}+\frac {a \left (a^{2}+b^{2}\right )^{\frac {3}{2}}-a^{4}-2 a^{2} b^{2}-b^{4}}{b \left (a^{2}+b^{2}\right )^{\frac {3}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {3}{2}} d a}\) | \(209\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 168, normalized size = 1.49 \begin {gather*} -\frac {b^{3} \log \left (\frac {b e^{\left (-d x - c\right )} - a - \sqrt {a^{2} + b^{2}}}{b e^{\left (-d x - c\right )} - a + \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{3} + a b^{2}\right )} \sqrt {a^{2} + b^{2}} d} + \frac {2 \, {\left (a e^{\left (-d x - c\right )} - b\right )}}{{\left (a^{2} + b^{2} + {\left (a^{2} + b^{2}\right )} e^{\left (-2 \, d x - 2 \, c\right )}\right )} d} - \frac {\log \left (e^{\left (-d x - c\right )} + 1\right )}{a d} + \frac {\log \left (e^{\left (-d x - c\right )} - 1\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 581 vs.
\(2 (110) = 220\).
time = 0.50, size = 581, normalized size = 5.14 \begin {gather*} \frac {2 \, a^{3} b + 2 \, a b^{3} + {\left (b^{3} \cosh \left (d x + c\right )^{2} + 2 \, b^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b^{3} \sinh \left (d x + c\right )^{2} + b^{3}\right )} \sqrt {a^{2} + b^{2}} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{2} + b^{2} \sinh \left (d x + c\right )^{2} + 2 \, a b \cosh \left (d x + c\right ) + 2 \, a^{2} + b^{2} + 2 \, {\left (b^{2} \cosh \left (d x + c\right ) + a b\right )} \sinh \left (d x + c\right ) + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right ) + a\right )}}{b \cosh \left (d x + c\right )^{2} + b \sinh \left (d x + c\right )^{2} + 2 \, a \cosh \left (d x + c\right ) + 2 \, {\left (b \cosh \left (d x + c\right ) + a\right )} \sinh \left (d x + c\right ) - b}\right ) + 2 \, {\left (a^{4} + a^{2} b^{2}\right )} \cosh \left (d x + c\right ) - {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (d x + c\right )^{2}\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) + 1\right ) + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4} + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sinh \left (d x + c\right )^{2}\right )} \log \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right ) - 1\right ) + 2 \, {\left (a^{4} + a^{2} b^{2}\right )} \sinh \left (d x + c\right )}{{\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}{\left (c + d x \right )} \operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 146, normalized size = 1.29 \begin {gather*} -\frac {\frac {b^{3} \log \left (\frac {{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, b e^{\left (d x + c\right )} + 2 \, a + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{3} + a b^{2}\right )} \sqrt {a^{2} + b^{2}}} + \frac {\log \left (e^{\left (d x + c\right )} + 1\right )}{a} - \frac {\log \left ({\left | e^{\left (d x + c\right )} - 1 \right |}\right )}{a} - \frac {2 \, {\left (a e^{\left (d x + c\right )} + b\right )}}{{\left (a^{2} + b^{2}\right )} {\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.82, size = 668, normalized size = 5.91 \begin {gather*} \frac {\frac {2\,b}{d\,\left (a^2+b^2\right )}+\frac {2\,a\,{\mathrm {e}}^{c+d\,x}}{d\,\left (a^2+b^2\right )}}{{\mathrm {e}}^{2\,c+2\,d\,x}+1}+\frac {\ln \left ({\mathrm {e}}^{c+d\,x}-1\right )}{a\,d}-\frac {\ln \left ({\mathrm {e}}^{c+d\,x}+1\right )}{a\,d}-\frac {b^3\,\ln \left (\frac {32\,\left (-4\,{\mathrm {e}}^{c+d\,x}\,a^3+2\,a^2\,b-5\,{\mathrm {e}}^{c+d\,x}\,a\,b^2+2\,b^3\right )}{b^2\,{\left (a^2+b^2\right )}^2}-\frac {128\,a^{10}\,{\mathrm {e}}^{c+d\,x}-64\,a^9\,b-96\,a\,b^9+64\,b^7\,\sqrt {{\left (a^2+b^2\right )}^3}-384\,a^3\,b^7-512\,a^5\,b^5-288\,a^7\,b^3+288\,a^2\,b^8\,{\mathrm {e}}^{c+d\,x}+960\,a^4\,b^6\,{\mathrm {e}}^{c+d\,x}+1152\,a^6\,b^4\,{\mathrm {e}}^{c+d\,x}+608\,a^8\,b^2\,{\mathrm {e}}^{c+d\,x}-64\,a\,b^6\,{\mathrm {e}}^{c+d\,x}\,\sqrt {{\left (a^2+b^2\right )}^3}+32\,a^3\,b^4\,{\mathrm {e}}^{c+d\,x}\,\sqrt {{\left (a^2+b^2\right )}^3}}{b^2\,{\left ({\left (a^2+b^2\right )}^3\right )}^{3/2}\,\left (a^2+b^2\right )}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{d\,a^7+3\,d\,a^5\,b^2+3\,d\,a^3\,b^4+d\,a\,b^6}+\frac {b^3\,\ln \left (\frac {32\,\left (-4\,{\mathrm {e}}^{c+d\,x}\,a^3+2\,a^2\,b-5\,{\mathrm {e}}^{c+d\,x}\,a\,b^2+2\,b^3\right )}{b^2\,{\left (a^2+b^2\right )}^2}-\frac {96\,a\,b^9+64\,a^9\,b-128\,a^{10}\,{\mathrm {e}}^{c+d\,x}+64\,b^7\,\sqrt {{\left (a^2+b^2\right )}^3}+384\,a^3\,b^7+512\,a^5\,b^5+288\,a^7\,b^3-288\,a^2\,b^8\,{\mathrm {e}}^{c+d\,x}-960\,a^4\,b^6\,{\mathrm {e}}^{c+d\,x}-1152\,a^6\,b^4\,{\mathrm {e}}^{c+d\,x}-608\,a^8\,b^2\,{\mathrm {e}}^{c+d\,x}-64\,a\,b^6\,{\mathrm {e}}^{c+d\,x}\,\sqrt {{\left (a^2+b^2\right )}^3}+32\,a^3\,b^4\,{\mathrm {e}}^{c+d\,x}\,\sqrt {{\left (a^2+b^2\right )}^3}}{b^2\,{\left ({\left (a^2+b^2\right )}^3\right )}^{3/2}\,\left (a^2+b^2\right )}\right )\,\sqrt {{\left (a^2+b^2\right )}^3}}{d\,a^7+3\,d\,a^5\,b^2+3\,d\,a^3\,b^4+d\,a\,b^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________